Solving BSM PDE Equation
Black-Scholes equation is a partial differential equation that describes the price of the option over time. The equation is given by:
\[ \frac{\partial V}{\partial t} + \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} + rS\frac{\partial V}{\partial S} - rV = 0 \tag{1} \]
where \(V\) is the price of the option, \(S\) is the price of the underlying asset, \(r\) is the risk-free interest rate, \(\sigma\) is the volatility of the underlying asset.
Replace Current Value by Future Value
Define \(U(S,t)\) as the future value of the option, then the relation with \(V(S,t)\) is \[ V(S,t)=e^{-r(T-t)}U(S,t) \]
And \(\Theta\) is defined as \[ \Theta = \frac{\partial V}{\partial t} =re^{-r(T-t)}U(S,t) + e^{-r(T-t)}U(S,t)\frac{\partial U}{\partial t} \] where we used chain rule.
Similarly, \(\Delta\) is defined as \[ \Delta = \frac{\partial V}{\partial S} = e^{-r(T-t)}\frac{\partial U}{\partial S} \] And \(\Gamma\) is defined as \[ \Gamma = \frac{\partial^2 V}{\partial S^2} = e^{-r(T-t)}\frac{\partial^2 U}{\partial S^2} \]
Substitute \(\Theta\), \(\Delta\) and \(\Gamma\) into Black-Scholes equation, we get \[ \begin{aligned} &re^{-r(T-t)}U(S,t) + e^{-r(T-t)}U(S,t)\frac{\partial U}{\partial t} + \frac{1}{2} \sigma^2 S^2 e^{-r(T-t)}\frac{\partial^2 U}{\partial S^2} + r S e^{-r(T-t)}\frac{\partial U}{\partial S} - r e^{-r(T-t)}U(S,t) = 0\\ &\Rightarrow \frac{\partial U}{\partial t} + \frac{1}{2} \sigma^2 S^2 \frac{\partial^2 U}{\partial S^2} + r S \frac{\partial U}{\partial S} = 0 \end{aligned} \]
It means \(rV\) is the risk-free rate discounted value of the option, and now the equation is represented in terms of \(U(S,t)\), which is the future value of the option.
Change to Forward Equation
Black-Scholes equation is a backward equation, which means it is solved from the maturity date \(T\) to the current date \(t=0\), we have final condition \(U(S,T)=\max(S-K,0)\). But this is ill-posed, because when you give final conditional to a backward equation, a small change in the final condition can lead to a large change in the solution.
This is the reason why we need to change the Black-Scholes equation to a forward equation.
Now define \(\tau = T-t\), and \[ \frac{\partial U}{\partial t} = -\frac{\partial U}{\partial \tau} \] Then the Black-Scholes equation becomes \[ \frac{\partial U}{\partial \tau} = \frac{1}{2} \sigma^2 S^2 \frac{\partial^2 U}{\partial S^2} + r S \frac{\partial U}{\partial S} \tag{2} \]
Proceed with change of variable \(S = e^\xi\), first derivative with Respect to \(S\) :
\[ \frac{\partial}{\partial S}=\frac{\partial \xi}{\partial S} \frac{\partial}{\partial \xi} \]
Since \(\xi=\log S\) and \(S^{-1} = e^{-\xi}\), we get:
\[ \frac{\partial \xi}{\partial S}=\frac{1}{S} \Longrightarrow \frac{\partial}{\partial S}=\frac{1}{S} \frac{\partial}{\partial \xi} = e^{-\xi} \frac{\partial}{\partial \xi} \]
So,
\[ \frac{\partial U}{\partial S}=\frac{1}{S} \frac{\partial U}{\partial \xi}=e^{-\xi} \frac{\partial U}{\partial \xi} \]
Second Derivative with Respect to \(S\), use chain rule and definition \(S^{-1} = e^{-\xi}\):
\[ \frac{\partial^2 U}{\partial S^2}=\frac{\partial}{\partial S}\left(\frac{1}{S} \frac{\partial U}{\partial \xi}\right)=\frac{\partial}{\partial S}\left(e^{-\xi} \frac{\partial U}{\partial \xi}\right) \]
Since \(\frac{\partial}{\partial S}=e^{-\xi} \frac{\partial}{\partial \xi}\) :
\[ \frac{\partial^2 U}{\partial S^2}=e^{-\xi} \frac{\partial}{\partial \xi}\left(e^{-\xi} \frac{\partial U}{\partial \xi}\right) \]
Applying the product rule:
\[ \frac{\partial^2 U}{\partial S^2}=e^{-\xi}\left(\frac{\partial}{\partial \xi}\left(e^{-\xi}\right) \frac{\partial U}{\partial \xi}+e^{-\xi} \frac{\partial^2 U}{\partial \xi^2}\right) \]
Compute \(\frac{\partial}{\partial \xi}\left(e^{-\xi}\right)\) :
\[ \frac{\partial}{\partial \xi}\left(e^{-\xi}\right)=-e^{-\xi} \]
Substituting this back into the equation:
\[ \frac{\partial^2 U}{\partial S^2}=e^{-\xi}\left(-e^{-\xi} \frac{\partial U}{\partial \xi}+e^{-\xi} \frac{\partial^2 U}{\partial \xi^2}\right) \]
Simplify by factoring out \(e^{-2 \xi}\) :
\[ \frac{\partial^2 U}{\partial S^2}=e^{-2 \xi}\left(\frac{\partial^2 U}{\partial \xi^2}-\frac{\partial U}{\partial \xi}\right) \]
Now substitute these expressions into the Black-Scholes PDE (2): \[ \begin{aligned} &\frac{\partial U}{\partial \tau}=\frac{1}{2} \sigma^2 S^2 \frac{\partial^2 U}{\partial S^2}+r S \frac{\partial U}{\partial S} \end{aligned} \]
Substitute \(S^2=e^{2\xi}, \frac{\partial U}{\partial S}=e^{-\xi} \frac{\partial U}{\partial \xi}\), and \(\frac{\partial^2 U}{\partial S^2}=e^{-2 \xi}\left(\frac{\partial^2 U}{\partial \xi^2}-\frac{\partial U}{\partial \xi}\right)\) :
\[ \frac{\partial U}{\partial \tau}=\frac{1}{2} \sigma^2 \underbrace{e^{2 \xi}}_{S^2} \underbrace{e^{-2 \xi}\left(\frac{\partial^2 U}{\partial \xi^2}-\frac{\partial U}{\partial \xi}\right)}_{\frac{\partial^2 U}{\partial S^2}}+r \underbrace{e^{\xi}}_{S} \underbrace{e^{-\xi} \frac{\partial U}{\partial \xi}}_{\frac{\partial U}{\partial S}} \]
Simplify:
\[ \frac{\partial U}{\partial \tau}=\frac{1}{2} \sigma^2\left(\frac{\partial^2 U}{\partial \xi^2}-\frac{\partial U}{\partial \xi}\right)+r \frac{\partial U}{\partial \xi} \]
Rearranging terms:
\[ \frac{\partial U}{\partial \tau}=\frac{1}{2} \sigma^2 \frac{\partial^2 U}{\partial \xi^2}+\left(r-\frac{1}{2} \sigma^2\right) \frac{\partial U}{\partial \xi} \tag{3} \]
Remove the Drift Term
To transform the equation closer to the heat equation, we need to remove the first order term, the idea is essentially the change of basis, because partial derivative is a slope, to remove the slope, we can to rotate the basis.
Change of variable is essentially a change of basis, the new variables let us “rebasing” the equation to the new coordinate system.
Before moving any further, lets take a closer look of (3), and I switch the order of the terms: \[ \frac{\partial U}{\partial \tau}=\left(r-\frac{1}{2} \sigma^2\right) \frac{\partial U}{\partial \xi} +\frac{1}{2} \sigma^2 \frac{\partial^2 U}{\partial \xi^2} \]
To remove distraction, let denote \(\frac{\partial U}{\partial \xi} = x\) and \(\frac{\partial U}{\partial \tau} = y\), then the equation becomes: \[ y=\left(r-\frac{1}{2} \sigma^2\right) x +\frac{1}{2} \sigma^2 \frac{\partial x}{\partial \xi} \]
The first term on the right hand side is a drift term, and the second term is a diffusion term. The goal is to remove the drift term, and the idea is to rotate the basis to remove the drift.
We introduce a new variable:
\[ x=\xi+\left(r-\frac{1}{2} \sigma^2\right) \tau \]
and redefine \(U\) in terms of \(x\) and \(\tau\) as \(u(x, \tau)=U(\xi, \tau)\). Now let’s see how this affects the derivatives, partial derivative with Respect to \(\xi\) :
From the chain rule for partial derivatives, we know:
\[ \frac{\partial}{\partial \xi}=\frac{\partial x}{\partial \xi} \frac{\partial}{\partial x}+\frac{\partial \tau}{\partial \xi} \frac{\partial}{\partial \tau} \]
However, since \(\tau\) is independent of \(\xi\), we have:
\[ \frac{\partial \tau}{\partial \xi}=0 \]
Thus, the chain rule simplifies to:
\[ \frac{\partial}{\partial \xi}=\frac{\partial x}{\partial \xi} \frac{\partial}{\partial x} \]
And \(\frac{\partial x}{\partial \xi}=1\) :
\[ \frac{\partial}{\partial \xi}=1 \cdot \frac{\partial}{\partial x}=\frac{\partial}{\partial x} \]
Since \(U(\xi, \tau)=u(x, \tau)\) and we have established that \(\frac{\partial}{\partial \xi}=\frac{\partial}{\partial x}\), we can write: \[ \begin{aligned} &\frac{\partial U}{\partial \xi}=\frac{\partial u}{\partial x} \end{aligned} \] Similarly, we can show that \(\frac{\partial^2 U}{\partial \xi^2}=\frac{\partial^2 u}{\partial x^2}\). \[ \begin{aligned} \frac{\partial^2}{\partial \xi^2}=\frac{\partial^2}{\partial x^2}\\ \end{aligned} \] In terms of \(u(x, \tau)\) \[ \frac{\partial^2 U}{\partial \xi^2}=\frac{\partial^2 u}{\partial x^2} \]
Since \(U(\xi, \tau)=u(x, \tau)\), we can write the partial derivative with respect to \(\tau\) as: \[ \frac{\partial U}{\partial \tau}=\frac{\partial u}{\partial \tau}+\frac{\partial u}{\partial x} \frac{\partial x}{\partial \tau} \] Also \[ \frac{\partial x}{\partial \tau}=r-\frac{1}{2} \sigma^2 \]
Substitute \(\frac{\partial U}{\partial \xi}=\frac{\partial u}{\partial x}\) and \(\frac{\partial x}{\partial \tau}=r-\frac{1}{2} \sigma^2\) into the equation: \[ \frac{\partial U}{\partial \tau} = \frac{\partial u}{\partial \tau}+\frac{\partial u}{\partial x} \left(r-\frac{1}{2} \sigma^2\right) \]
Now collect the terms and substitute into (3): \[ \frac{\partial U}{\partial \tau}=\frac{1}{2} \sigma^2 \frac{\partial^2 U}{\partial \xi^2}+\left(r-\frac{1}{2} \sigma^2\right) \frac{\partial U}{\partial \xi} \]
It becomes: \[ \underbrace{\frac{\partial u}{\partial \tau}+\left(r-\frac{1}{2} \sigma^2\right) \frac{\partial u}{\partial x}}_{\frac{\partial U}{\partial \tau} }=\frac{1}{2} \sigma^2 \underbrace{\frac{\partial^2 u}{\partial x^2}}_{\frac{\partial^2 U}{\partial \xi^2}}+\left(r-\frac{1}{2} \sigma^2\right) \underbrace{\frac{\partial u}{\partial x}}_{\frac{\partial U}{\partial \xi}} \]
Cancel out the drift term, we final get one-dimension heat equation: \[ \frac{\partial u}{\partial \tau}=\frac{1}{2} \sigma^2 \frac{\partial^2 u}{\partial x^2} \tag{4} \]
To summarize all these steps:
\[ \begin{aligned} V(S, t) & =e^{-r(T-t)} U(S, t)\quad\text{Current value of option is discounted terminal value}\\ & =e^{-r \tau} U(S, T-\tau)\quad \text{Convert to forward equation}\\ & =e^{-r \tau} U\left(e^{\xi}, T-\tau\right) \quad \text{Use lognormal assumption for asset's price}\\ & =e^{-r \tau} U\left(e^{x-\left(r-\frac{1}{2} \sigma^2\right) \tau}, T-\tau\right) \quad \text{Use the result from Itô's lemma on lognormal process}\\ & =e^{-r \tau} u(x, \tau) \quad \text{Result after terms cancelling}\\ \end{aligned} \]
Specify Intial and Boundary Conditions
Initial Condition
Because PDE has been converted to a forward heat equation, the initial condition is now at \(\tau=0\), which is the maturity date \(T\). The initial condition (actually the final conditional of orginal BS PDE) is \(V(S, T)=\max(S-K, 0)\), and in terms of \(u(x, \tau)\), it becomes:
\[ u(x, 0)=\max(S-K, 0) \]